<?php

include("mysql_conn.php");

$result=mysql_query("select userid,username,fullname,email,active,admin,boss from users order by username");

echo "<html>
<head><title>ITG Project Status: User List</title>
<link rel='stylesheet' type='text/css' href='style.css'>
</head><body><h2>User List</h2>
Click on the User ID to edit the user's info<br>
<table>
<tr><th>User ID</th><th>Username</th><th>Full Name</th><th>email</th><th>Active</th><th>Admin</th><th>Supervisor</th></tr>";

while($row=mysql_fetch_array($result))
{
 echo "<tr>";
 echo "<td><a href='edituser.php?userid=" . $row['userid']. "'>" .  $row['userid'] . "</a></td>";
 echo "<td>" .  $row['username'] . "</td>";
 echo "<td>" .  $row['fullname'] . "</td>";
 echo "<td>" .  $row['email'] . "</td>";
 echo "<td>" .  $row['active'] . "</td>";
 echo "<td>" .  $row['admin'] . "</td>";
 echo "<td>" .  $row['boss'] . "</td>";
 echo "</tr>";
}
echo "</table>";
echo "<a href='adduser.html'>New User</a> - <a href='index.php'>Return to Admin Index</a><br></body></html>";

mysql_close($con);
?>
